package com.dzt.androidframework.database.tasks;

import android.content.Context;
import android.support.annotation.NonNull;
import android.view.View;

import com.dzt.androidframework.database.javabean.Task;
import com.dzt.androidframework.mvp.BasePresenter;
import com.dzt.androidframework.mvp.BaseView;

import java.util.List;

/**
 * Created by M02323 on 2017/6/10.
 */

public class TasksContract {
	interface Presenter extends BasePresenter {
		void result(int requestCode, int resultCode);
		void loadTasks(boolean forceUpdate);
		void addNewTask();
		void openTaskDetails(@NonNull Task requestedTask);
		void completeTask(@NonNull Task completedTask);
		void activateTask(@NonNull Task activeTask);
		void clearCompletedTasks();
		void setFiltering(TasksFilterType requestType);
		TasksFilterType getFiltering();
	}

	interface View extends BaseView<Presenter> {
		void setLoadingIndicator(boolean active);
		void reLoadTask();
		void showTasks(List<Task> tasks);
		void showAddTask();
		void showTaskDetailsUi(String taskId);
		void showTaskMarkedComplete();
		void showTaskMarkedActive();
		void showCompletedTasksCleared();
		void showLoadingTasksError();
		void showNoTasks();
		void showActiveFilterLabel();
		void showCompletedFilterLabel();
		void showAllFilterLabel();
		void showNoActiveTasks();
		void showNoCompletedTasks();
		void showSuccessfullySavedMessage();
		boolean isActive();
		void showFilteringPopUpMenu(Context context, android.view.View view);
	}
}
